
export const useForm = (name?: string): {
  instance: {
    setFormValues: (values: Record<string, any>) => void
    getFormValues: () => Record<string, any>
    getFormValuesWithValid: () => Promise<void | Record<string, any>>
    submit: () => Promise<void>
  }
} => {

  /// useTemplateRef 无法在uni中使用
  const instance = useTemplateRef(name || 'dynamicFormInstance');

  return instance;
}